﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CenyLetu
{
    class ZavazadloDekorator : CenaDekorator
    {
        private double vaha;

        public ZavazadloDekorator(ICena c, double v)
            : base(c)
        {
            vaha = v;
        }

        public override decimal GetCena()
        {
            //udava nasovky peti 
            //za kazdych 5 KG hmtnosti cena +5%
            int koeficient = (int)vaha / 5;
            return base.GetCena() + base.GetCena() * ((decimal)0.05 * koeficient);
        }
    }
}
